package controller.Editor;

import UI.editors.EditorTextMode;
import controller.IMainController;
import controller.IEditorsController;

public class TextEditorController implements ITextEditorController{

	private EditorTextMode mView;
	private IEditorsController mEditorsController;
	
	public TextEditorController(IEditorsController top){
		mEditorsController = top;
	}
	
	@Override
	public void loadText(String theText) {
		mView.setText(theText);
	}

	@Override
	public void setView(EditorTextMode view) {
		mView = view;
		mView.setController(this);
	}

	@Override
	public String getText() {
		return new String (mView.getTextArea().getText());
	}
}
